#pragma once
#include "UBox.h"
class Decode
{
public:
	Decode();
	~Decode();

public:
	typedef vector<unsigned char> Packet;
	typedef vector<unsigned char>::iterator PacketIt;
	typedef vector<unsigned char>::const_iterator PacketConstIt;
	enum { Header = 0xFAFA, Tail = 0xFB };

	static void makeHeartbeat(Packet & p, const UBox::BoxId & id);

public:
	static unsigned char checkBit(CString subStr);
	static void checkBit(Packet *p);
};

